Just put the following line near the start of your file, and you'll receive fatal error messages (from die -- you are using die, aren't you?) in your web browser. No need to tail -f the logs with:
use CGI::Carp qw(fatalsToBrowser);
Comment on RE: RE: Re: Creating a file in a CGI script...