Write a better PEM handler , maybe have a check if it is a php file , php , $[] density compared to total size .