Added support for getting the file size
Implemented an error handler to compensate for PHP's error/exception mess